local skill = fk.CreateSkill {
  name = "hanqing__bearing_rod_skill",
}

Fk:loadTranslationTable{
  ["hanqing__bearing_rod_skill"] = "负荆请罪",
  ["#hanqing__bearing_rod_skill"] = "选择一名其他角色，你对自己造成1点伤害，令其回复1点体力，其可以将其场上一张牌移至你场上",
  ["#hanqing__bearing_rod-move"] = "负荆请罪：是否将你场上一张牌移至 %src 场上？",
}

skill:addEffect("cardskill", {
  target_num = 1,
  mod_target_filter = function(self, player, to_select, selected)
    return to_select ~= player
  end,
  target_filter = Util.CardTargetFilter,
  on_effect = function(self, room, effect)
    local player = effect.from
    local target = effect.to
    if not player.dead then
      room:damage{
        from = player,
        to = player,
        card = effect.card,
        damage = 1,
        skillName = skill.name,
      }
    end
    if target.dead then return end
    room:recover{
      who = target,
      num = 1,
      recoverBy = player,
      card = effect.card,
      skillName = skill.name,
    }
    if player.dead or target.dead or not target:canMoveCardsInBoardTo(player) then return end
    if room:askToSkillInvoke(target, {
      skill_name = skill.name,
      prompt = "#hanqing__bearing_rod-move:"..player.id,
    }) then
      room:askToMoveCardInBoard(target, {
        target_one = player,
        target_two = target,
        skill_name = skill.name,
        move_from = target,
      })
    end
  end,
})

return skill
